{% extends "blog/base.html" %}
{% load blog_tags %}

{% block content %}
<ul>
  {% for post in posts %}
    <li>
    <h3><a href="{% url 'blog:post_detail' post.id %}">{{ post }}</a>
       <h6>
       <p>发布于 {{ post.created }} by {{ post.author }}</p></h6>
       <p>
         <h5><div class="panel-body">
                <!--{{ post.content|truncatewords:30|linebreaks }}-->
                {{ post.content|markdown|truncatewords_html:30 }}
             </div>
         </h5>
       </p>
    </h3>
    </li>
  {% empty %}
    <li>你没有任何博文</li>
  {% endfor %}  
</ul>
  {% include "pagination.html" with page=posts %}
{% endblock content %}
